home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12072 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.9 KB  |  48 lines

  1. Newsgroups: comp.programming,comp.lang.c++,comp.lang.c
  2. Path: watserv3.uwaterloo.ca!news
  3. From: bcrwhims@uwaterloo.ca  (Carsten Whimster)
  4. Subject: Re: ? about writing a compiler
  5. Message-ID: <DoG4Lo.JxM@watserv3.uwaterloo.ca>
  6. Sender: news@watserv3.uwaterloo.ca
  7. Nntp-Posting-Host: cnts3p05.uwaterloo.ca
  8. Reply-To: carsten_whimster@iqpac.com (Carsten Whimster)
  9. Organization: EDM/2
  10. X-Newsreader: IBM NewsReader/2 v1.2.5
  11. References: <alt-x.26.016ECCB6@erinet.com>
  12. Date: Mon, 18 Mar 1996 04:32:12 GMT
  13.  
  14. In <alt-x.26.016ECCB6@erinet.com>, alt-x@erinet.com (alternate-x) writes:
  15. >could someone please tell me of some pages that discuss the basics of 
  16. >constructing a compiler?  Any help is much appreciated. Thank you.
  17.  
  18. :)
  19.  
  20. You need to know about:
  21.  
  22. - Regular expressions and FSMs, for the scanner
  23. - Context-free Grammars for the parser
  24. - Context-sensitive grammars, or something else for the code generator
  25.  
  26. and you need to have a really good grasp of ASSEMBLER for this too. Plus
  27. you should know the rudiments of code optimization. That's just off the 
  28. top of my head; I probably missed something.
  29.  
  30. It takes at least two or three years for univeristy students to learn 
  31. all the required tools for this (not that they study it full time 
  32. however). I would recommend "Compilers - Principles, Techniques, and 
  33. Tools", Aho, Sethi, Ullman or Fischer's "Crafting a Compiler" for 
  34. reading. Fischer's book is probably easier, but quite good. Aho et al go
  35. in more depth, but move faster too.
  36.  
  37. Finally, you are probably looking in the wrong newsgroup as someone else
  38. mentioned. You could probably write a toy compiler in 4 months if you 
  39. were dedicated to it... :) A real compiler for a real language is a 
  40. different story though.
  41.  
  42. Carsten Whimster -- carsten_whimster@iqpac.com
  43. -- EDM/2 Associate Editor and Book reviewer
  44. EDM/2   http://www.iqpac.com/edm2/index.shtml
  45. Reviews http://www.iqpac.com/edm2/columns/books.shtml
  46. Webpage http://www.undergrad.math.uwaterloo.ca/~bcrwhims/index.html
  47.  
  48.